package com.zhang.modules.api.rep;

import com.zhang.common.jpa.rep.BaseRep;
import com.zhang.modules.api.entity.Api;
import org.springframework.data.jpa.repository.Query;
import org.springframework.stereotype.Repository;

import java.util.List;

@Repository
public interface ApiRep extends BaseRep<Api,String> {
    Api findByNameEquals(String name);

    Api findByPathEquals(String path);

    @Query(value = "select * from sys_acl_api where anonymous = 0 and api_group != 1",nativeQuery = true)
    List<Api> findApi();








}
